package security.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import security.entity.Menu;
import security.entity.Role;
import security.entity.Users;

import java.util.List;

/**
 * @program: check-repetition
 * @description:
 * @author: hjk
 * @create: 2021-07-16 16:00
 **/
@Repository
public interface UserMapper extends BaseMapper<Users> {

    /**
     * 根据用户 Id 查询用户角色
     * @param userId
     * @return
     */
    List<Role> selectRoleByUserId(Long userId);
    /**
     * 根据用户 Id 查询菜单
     * @param userId
     * @return
     */
    List<Menu> selectMenuByUserId(Long userId);
}
